﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using YouWei.Infrastructure.Entity;
using YouWei.Infrastructure.Enums;

namespace YouWei.Infrastructure.Models
{
    public class SmsBlackDayDto: SmsBlackDay
    {
        /// <summary>
        /// 通信制式类型
        /// </summary>
        public string DateTypeTxt
        {
            get
            {
                return Utility.EnumHelper.GetEnumDesc(typeof(SmsDateTypeEnum), DateType);
            }
        }

        /// <summary>
        /// 日期值
        /// </summary>
        public string DataValueTxt {
            get {
                if (DateType == 1)
                {
                    return Utility.EnumHelper.GetEnumDesc(typeof(YouWei.Infrastructure.Enums.SmsWeekEnum), DateValue);
                }
                else
                {
                    return DateValue.ToString().Insert(4, "-").Insert(7, "-");
                }
            }
        }
    }
}